biggie = 2^1000
str = show biggie
toIntAndAdd = (+) . (\x -> (read (x:[]))::Integer)
main = print $ foldr toIntAndAdd 0 str